<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Greeting</title>
</head>
<body>
	<?php 
		$hour = date('G');
		$year = date('Y');

		if ($hour>=5 && $hour<12) {
			echo '<h1>Good Morning!</h1>';
		}else if ($hour>=12 && $hour<18) {
			echo '<h1>Good Afternoon!</h1>';
		}else if ($hour>=18 && $hour<22) {
			echo '<h1>Good Evening!</h1>';
		}else {
			echo '<h1>Good Night!</h1>';
		}

		$leapYear = FALSE;

		if (($year % 4 == 0) && ($year % 100 != 0) || ($year % 400 == 0)) {
			$leapYear = true;
		}

		echo "<p>Did you know that ".$year." is ". ($leapYear?"":"not ") ."a leap year?</p>";
	?>	
</body>
</html>